    <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('查询字段被哪些接口引用')" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <h4 class="form-header h4">查询字段被哪些接口引用</h4>
        <div class="row">
            <div class="col-sm-12">
                <div class="col-sm-12 select-table table-striped">
                    <table id="bootstrap-table" style="table-layout:fixed;"></table>
                </div>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "interface/interface";
        $(function() {
            var options = {
                data: [[${interfaceInfoList}]] || [],
                pagination: false,
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                sidePagination: "client",
                fixedColumns: true,
                fixedNumber: 4,
                columns: [
                    {
                        field: 'id',
                        title: 'ID',
                        visible: false
                    },{
                    field: 'interfaceName',
                    title: '接口名称'
                },
                {
                    field: 'fbType',
                    title: '接口类型',
                    formatter: function(value, row, index) {
                        if (value == '1') return 'method';
                        if (value == '2') return 'BFF';
                        if (value == '3') return 'DUBBO';
                        if (value == '4') return '虚拟用况';
                        if (value == '5') return '虚拟用况组';
                    }
                },{
                        field: 'relationInterfaceName',
                        title: '被依赖接口名称',
                        formatter: function(value, row, index) {
                            if (value) return value;
                            return '';
                        }
                    },
                    {
                        title: '操作',
                        align: 'center',
                        formatter: function(value, row, index) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="edit(\'' + row.id + '\', '+row.fbType+')"><i class="fa fa-edit"></i>编辑</a> ');
                            return actions.join('');
                        }
                    }]
            };
            $.table.init(options);
        });

        function edit(id, fbType) {
            if (fbType == '4') {
                $.operate.addTab2("接口编辑", prefix + "/bff_usage_params/" + id);
            } else if (fbType == '5') {
                $.modal.openTab("虚拟用况组编辑", ctx + "virtualUsageGroup/virtualUsageGroup/edit?id=" + id);
            } else {
                $.operate.addTab2("接口编辑", prefix + "/editInterface/" + id);
            }
        }
    </script>
</body>
</html>